<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>首界面</title>
<script type="text/javascript" src="../Public/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){  
    $("#shareContent").keydown(function(){  
        var curLength=$("#shareContent").val().length;   
        if(curLength>=25){  
            var num=$("#shareContent").val().substr(0,25);  
            $("#shareContent").val(num);  
            alert("超过字数限制，多出的字将被截断!");  
        }  
        else{  
            var no = $("#shareContent").val().length;
            no=no+"/25";
            $("#textCount").text(no);  
        }  
    })  
});
 function selectitem(index){
   switch(index){
    case 1:
    window.location.href="{:U('Upload/uploadpicture')}"
    break;
    case 2:
    window.location.href="{:U('Note/addBlog')}"
    break;
    case 3:
    window.location.href="{:U('First/Index')}"
    break;
    case 4:
    window.location.href="{:U('Favorite/Index')}"
    break;
    case 5:
    window.location.href="{:U('Video/addVideo')}"
    break;
    case 6:
    window.location.href="{:U('Growth/Index')}"
    break;
    case 7:
    window.location.href="{:U('Timeshow/Index')}"
    break;
   }
}
function toChild(uid)
{
  var url = 'getChild/uid/'+uid;
  window.location.href = "{:U('"+url+"')}";
}
function changerole(){
	$('#role img').attr('src',$('#select_r').attr('value'));
}
function addShare()
{
    var contents = $('#shareContent').val();

    $.post("{:U('Child/addShare')}",{content:contents},function(data){
        var jsonObj = $.parseJSON(data);
        $('#dayshare').html(jsonObj.data['content']+"&nbsp;&nbsp&nbsp;&nbsp;<b style='font-size:8pt;'>"+jsonObj.data['ctime']+"</b>"); 
        $('#shareContent').attr('value','');
        });

}
function creatAnother()
{
    window.location.href = "{:U('toAddAnother')}"
}
</script>
<style>

div{
	margin:0px;
	margin-left:auto;
	margin-right:auto;
	/*border:solid ;
	border-color:#Ff0000;*/
	}
body {
	height:298px;
	background:#ffffff;
    clear:both;
    margin:0px;	
	margin-left:2%;
}
a {
	text-decoration: none;
	color:#036e6c;
	font-family:'黑体';
    letter-spacing:1px;
	font-size:9pt;
}
input{
	background:#f2fbfe;
	}
#manager_title{
	background:url(../Public/maincontent1/image/manager.png) no-repeat left center;
	width:98%;
	margin-left:2%;
	height:16px;
	}	
.acbu{
	margin-left:3%;
	margin-top:8px;
	height:80%;
	width:50px;
	float:left;
    background:center center no-repeat;
    cursor:pointer;
	}
.record{
	width:98%;
	height:40px;
	float:left;
	}	
.record div{
	margin-left:3%;
	}
.upd{
	color:#D0D0D0;
	font-style:oblique;
	height:40px;
	float:left;
	line-height:40px;
	}
.ce{
	width:70%;
	}	
.ti{
	width:23%;
	}      
.myfontstyle{
    font-family:'黑体';
    letter-spacing: 1px;
} 	
</style>

</head>

<body>
<div style="width:100%;height:100%;">
<div id='main' style="float:left;width:67%;height:100%;margin-top:20px;">
    <div id="manager_title">
        <div style="margin-left:95px;float:left;font-size:8pt;margin-top:4px;color:#24b33c;"><a href="javascript:creatAnother();" >创建一个孩子</a></div>
    </div>
    <div style="margin-top:2%;width:100%">	
        <div style="margin-left:2%;width:98%;height:60px;background:#E2F4FD;">
            <div style="background:#E2F4FD;">
            <div style="float:left;margin-left:10px;background:url(../Public/child/image/head_img.png)center center;width:34px;height:40px;margin-top:5px;"><img src="../Public/upload/head/{$user.picture}" style="width:34px;height:40px;" /></div>
            <div style="float:left;color:#087270;width:90px;height:40px;margin-top:3px;text-align: center;line-height:40px;font-weight:bold;font-size:12pt;">{$username}&nbsp;||</div>        
            <div id="dayshare" style="float:left;text-align:inherit;margin-top:18px;color:#357170;font-size:11pt;"><span>{$shareList.content}</span>&nbsp;&nbsp;<span style="font-size:8pt;">{$shareList.ctime}</span></div>
            </div>
           
        </div>
       
    </div>
     <div style="width:98%;margin-left:2%;background:url(../Public/maincontent1/image/v_line.png) bottom center repeat-x;height:2%;"></div>
    <div style="background:#E2F4FD;height:50%;width:98%;margin-left:2%;">
      
          <div style="height:50%;width:100%;">
            <div class='acbu' style="background-image:url(../Public/maincontent1/image/note.png);" onclick="selectitem(2)"></div>
            <div class='acbu' style="background-image:url(../Public/maincontent1/image/newphoto.png);" onclick="selectitem(1)"></div>
            <div class='acbu' style="background-image:url(../Public/maincontent1/image/newvideo.png);" onclick="selectitem(5)"></div>
            <div class='acbu' style="background-image:url(../Public/maincontent1/image/favourite.png);" onclick="selectitem(4)"></div>
            <div class='acbu' style="background-image:url(../Public/maincontent1/image/newfirst.png);" onclick="selectitem(3)"></div>
            <div class='acbu' style="background-image:url(../Public/maincontent1/image/grow.png);" onclick="selectitem(6)"></div>
            <div class='acbu' style="background-image:url(../Public/maincontent1/image/timeshow.png);" onclick="selectitem(7)"></div>
        </div>

            <div style="height:60%;border:1px solid #dcdfda;border-left:none;border-right:none;background:#f2fafa;width:100%;">
        	<div style="width:100%;height:100%;margin-top:5px;">
            	<input type="text"  id="shareContent" style="height:48%;width:70%;margin-left:3%;margin-top:4%;float:left; font-size:12pt;color:#b9b9b9;background:#f2fafa;" onfocus="this.value=''" value="在这里分享我们每天喜怒哀乐！" />
                <div style="background:url(../Public/child/image/sharing.png) no-repeat center center; width:20%;height:100%;float:left;" onclick="addShare()"></div>
                <div id="textCount" class="myfontstyle" style="clear:right;float:right;width:5%;margin-right:1%;font-size:8pt;color:#b9b9b9;">0/25</div>
            </div>
        </div>
       
    </div>
    <div style="width:98%;margin-left:2%;background:url(../Public/maincontent1/image/v_line.png) bottom center repeat-x;height:2%;"></div>
    <div style="background:url(../Public/maincontent1/image/book.png) no-repeat left center;width:98%;margin-left:2%;height:27px;"></div>
    <div id="news" style="width:98%;margin-left:2%;">
      <!--</a>  <div class="record"><div class="upd ce">张一的个人资料已更新</div>
        <div class="upd ti">2012/03/10&nbsp;12:00&nbsp;AM</div></div>
       <div class="record"><div class="upd ce">张一的个人资料已更新</div>
       <div class="upd ti">2012/03/10&nbsp;12:00&nbsp;AM</div></div>-->
    </div>
</div>
<div style="float:left;width:6%;background:url(../Public/maincontent1/image/m_line.png) no-repeat right center;height:266px; "></div>
<div style="float:left;width:27%;margin-top:30px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><div style="width:170px;height:185px"><img src="../Public/upload/head/{$parent.picture}" style="width:170px;height:185px;" /></div></td>
  </tr>
  <tr>
    <td ><div  style="background:url(../Public/maincontent1/image/v_line.png) bottom left repeat-x;width:180px;height:27px;"></div></td>
  </tr>
  <tr>
    <td>
        <div style="color:#036e6c;font-weight:bold; font-size:12pt;text-align:left;width:180px;height:30px;">
            <div style="float:left; margin-right:5px;">最近访问</div>
        </div>   
    </td>
  </tr>
  <tr>
    <td>
		<div  id="role" style="float:left;margin-left:20%;background:url(../Public/maincontent1/image/v_line.png) bottom left repeat-x;width:180px;height:100%;font-size:9pt;">              
              <volist name = "visit" id="visit">
               <div style="width:20%; margin:5%;float:left;">
                  <div><img src="../Public/upload/head/{$visit.picture}" style="float:left;width:33px;height:35px;" onclick="toChild({$visit.u_id})"/></div>
                  <div class="myfontstyle">{$visit.name}</div>   
              </div>  
            </volist> 
		</div>

    </td>
  </tr>
</table>
</div>
</div> 
<img src="../Public/maincontent1/image/flower.png" style="position:absolute;right:0;bottom:0; z-index:-50;" />
</body>
</html>
